package com.example.biyesheji.controller;

import com.example.biyesheji.pojo.ProductSales;
import com.example.biyesheji.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/product")
public class ProductController {

    @Resource
    private ProductService productService;

    @CrossOrigin
    @GetMapping("/list")
    public List<ProductSales> getList(){
        return productService.productSalesList();
    }
}
